import 'core-js';
import Vue from 'vue';
import router from './router';
import store from './store';

// @ts-ignore
import VueCropper from 'vue-cropperjs';
// @ts-ignore
import VueTelInput from 'vue-tel-input';

// @ts-ignore
import ECharts from 'vue-echarts';
// import 'echarts/lib/chart/bar';
// import 'echarts/lib/component/tooltip';
// import 'echarts/lib/component/legend';
// import 'echarts/lib/chart/pie';
// import 'echarts/lib/component/dataZoom';

Vue.component('v-chart', ECharts);
import 'cropperjs/dist/cropper.css';
Vue.component(VueCropper);
Vue.use(VueTelInput);

// @ts-ignore
import Print from 'vue-print-nb';
Vue.use(Print);  //注册
// @ts-ignore
import Prints from '@/lib/print';
Vue.use(Prints);

import '@/style/index.scss';
// 图片预览样式
import 'viewerjs/dist/viewer.css';
import Viewer from 'v-viewer'
import 'viewerjs/dist/viewer.css'
Vue.use(Viewer)
Viewer.setDefaults({
  // @ts-ignore
  Options: { 'inline': true, 'button': true, 'navbar': true, 'title': true, 'toolbar': true, 'tooltip': true, 'movable': true, 'zoomable': true, 'rotatable': true, 'scalable': true, 'transition': true, 'fullscreen': true, 'keyboard': true, 'url': 'data-source' }
})
// @ts-ignore
import VueHttp from '@/lib/index.ts';
Vue.use(VueHttp);
import Moment from 'moment';
Moment.locale('zh-cn');
Vue.prototype.$moment = Moment;
// @ts-ignore
import loading from '@/lib/directive/loading.js';
Vue.use(loading);
// @ts-ignore
import pic from '@/lib/directive/pic.js';
Vue.use(pic);
Vue.config.productionTip = false;
// @ts-ignore
import Bus from '@/lib/plugins/bus.js';
Vue.use(Bus);
// @ts-ignore
import htmlToPdf from '@/components/utils/htmlToPdf';
Vue.use(htmlToPdf);

// @ts-ignore
import ckeditor from '@/components/editor-sl/ckeditor.vue';
Vue.component('ckeditor', ckeditor);

new Vue({
  router,
  store,
  render: (h) => h('router-view')
}).$mount('#app');
